POV-Ray : Newsgroups : povray.unofficial.patches : Matrices: Tiny improvement : Matrices: Tiny improvement Server Time
2 Nov 2024 03:13:32 EDT (-0400)
  Matrices: Tiny improvement  
From: Dejan D  M  Milosavljevic
Date: 2 Apr 2000 03:05:27
Message: <38e6f137@news.povray.org>
file ---matrices.h---



/***************************************************************************
*  Global preprocessor defines
****************************************************************************
**/

 add at line 34:  #define Assign_Matrix(a,b) memcpy(a,b,sizeof(MATRIX))
 add at line 35:  #define MZero(m) Assign_Matrix( m, MATRIX__MZero )
 add at line 36:  #define MIdentity(m) Assign_Matrix( m, MATRIX__MIdentity )



/***************************************************************************
Global variables
****************************************************************************
/

 add at line 48:  extern MATRIX MATRIX__MIdentity;
 add at line 49:  extern MATRIX MATRIX__MZero;


 delete line  55 which originaly contain: void MZero (MATRIX result);
 delete line  56 which originaly contain: void MIdentity (MATRIX result);




file ---matrices.c---


/***************************************************************************
 Local variables
***************************************************************************/

 at line 46  add:


 MATRIX MATRIX__MIdentity =
  {
   { 1.0, 0.0, 0.0, 0.0 },
   { 0.0, 1.0, 0.0, 0.0 },
   { 0.0, 0.0, 1.0, 0.0 },
   { 0.0, 0.0, 0.0, 1.0 }
  };

 MATRIX MATRIX__MZero =
  {
   { 0.0, 0.0, 0.0, 0.0 },
   { 0.0, 0.0, 0.0, 0.0 },
   { 0.0, 0.0, 0.0, 0.0 },
   { 0.0, 0.0, 0.0, 0.0 }
  };


 delete lines 55 to 146
 /*
  void MZero (MATRIX result);
  void MIdentity (MATRIX result);
 */

**************************
             dmi### [at] pttyu
http://members.xoom.com/dmilos/
**************************


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.